package com.it.nongchanping.service;

import com.it.nongchanping.entity.Announcement;
import java.util.List;

/**
 * 公告服务接口
 */
public interface AnnouncementService {
    
    /**
     * 查询所有公告
     */
    List<Announcement> getAllAnnouncements();
    
    /**
     * 根据ID查询公告
     */
    Announcement getAnnouncementById(Long id);
    
    /**
     * 查询已发布公告
     */
    List<Announcement> getPublishedAnnouncements();
    
    /**
     * 查询最新公告
     */
    List<Announcement> getLatestAnnouncements(int limit);
    
    /**
     * 保存公告
     */
    boolean saveAnnouncement(Announcement announcement);
    
    /**
     * 更新公告
     */
    boolean updateAnnouncement(Announcement announcement);
    
    /**
     * 删除公告
     */
    boolean deleteAnnouncement(Long id);
    
    /**
     * 计算所有公告的数量
     */
    long countAllAnnouncements();
} 